> For the complete documentation index, see [llms.txt](https://docs.jianny.net/work/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jianny.net/work/azure/aad-mobile-troubleshooting.md).

# AAD Mobile Troubleshooting

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2FcXiUvOZ2qdZ4VKfqk40U%2Fimage.png?alt=media&amp;token=3c3850aa-86a1-40f9-b43a-618058fb6769" alt=""><figcaption></figcaption></figure>

Background:

* A user is experiencing an "invalid credential" error when attempting to log in to a mobile app using OKTA.&#x20;
* The same credentials work on other platforms, including the mobile's Safari, except for O365.&#x20;
* The user is certain that the password entered is correct.&#x20;

      ![How Brands Can Use Memes to Connect With Consumers in a New Way](https://static-prod.adweek.com/wp-content/uploads/2018/07/confused-guy-meme-content-2018-652x367.jpg)

* Logs tell us that the issue may be due to different encoding.&#x20;
* Capturing the network traffic will help diagnose the problem or provide evidence if escalation is needed.

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2FN1SsDOuZCTvWIhW6BVAi%2Fimage.png?alt=media&amp;token=47f3e84b-ee7e-4294-a375-d85519338908" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Important Notes

* Ensure the issue can be reproduced before performing these steps.
* Handle the output file securely as it contains sensitive information.
  {% endhint %}

Steps:

1\. Prepare the Network:  &#x20;

\- Connect the iPhone and the computer (used as a proxy) to the same network or subnet/VLAN.  &#x20;

\- Ensure the Fiddler listening port (default is 8888) is not blocked on the computer. Temporarily disable the Windows firewall if necessary.

\
2\. Install and Configure Fiddler on the Computer:  &#x20;

\- Download Fiddler from <https://www.telerik.com/download/fiddler>   &#x20;

\- In Fiddler, go to Tools -> Options -> Connections, and enable “Allow remote computers to connect”.

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2Fl3Uu2cHZT9mDagNdFamz%2Fimage.png?alt=media&amp;token=4b415700-ffa4-4c8b-b30a-62b75af819cf" alt=""><figcaption></figcaption></figure>

3. Configure Fiddler for HTTPS Traffic:
   * Go to Tools -> Options -> HTTPS, and check “Decrypt HTTPS traffic”. Install and trust the Fiddler Root Certificate on the computer by following the prompts.

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2FcAsice0KzISN2Zq8KlPO%2Fimage.png?alt=media&amp;token=e66d88e7-dd38-4a18-8c03-fef5965e716a" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2FcWPEcJkS4tknJ0AqJ4lF%2Fimage.png?alt=media&amp;token=73963162-77be-4edf-bb2f-73f1d507a4fe" alt=""><figcaption></figcaption></figure>

4\. Install Certificate Maker Plugin for Fiddler:  &#x20;

\- Download and install the Certificate Maker Plugin from <https://www.telerik.com/fiddler/add-ons>  &#x20;

\- Restart Fiddler to apply changes.  &#x20;

\- Hover over the Online indicator on the Fiddler toolbar to display the computer’s IP addresses.  &#x20;

\- Ensure Fiddler is capturing traffic (indicated in the lower-left corner of Fiddler).

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2FTdEe4mMRdQK18UQTOrjK%2Fimage.png?alt=media&amp;token=5608eb04-3737-4529-8e08-db19f32a5438" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2FwyRg9UKXebCeAWCqo52r%2Fimage.png?alt=media&amp;token=2daa4ac2-fb62-45b0-97cb-55d869c81f35" alt=""><figcaption></figcaption></figure>

5. Configure the iPhone:
   * Connect the iPhone to the same network as the computer via Wi-Fi. Disable 3G/4G connections.
   * Verify the iPhone can reach Fiddler by navigating to `http://FiddlerMachineIP:8888` in a browser. This should display the Fiddler Echo Service page.
   * Go to Settings -> WLAN -> Select the connected Wi-Fi network -> Configure Proxy -> Manual.
   * Enter the IP address of the Fiddler machine in the Server box and the port (usually 8888) in the Port box. Ensure Authentication is off, then save the configuration.
   * In a browser on the iPhone, go to `http://<FiddlerMachineIP>.fiddler:8888` and download the FiddlerRoot certificate from the Fiddler Echo Service webpage.
   * Open the FiddlerRoot.cer file and install it.
   * Go to Settings -> General -> About -> Certificate Trust Settings and manually enable full trust for the FiddlerRoot certificate. Accept the dialog about third-party eavesdropping.

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2FwvvV3n8VLzpoOfjW9V57%2Fimage.png?alt=media&amp;token=d2cd5a0d-8c0d-404e-a553-e308a9b2622b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2FEpkZl26URcGguGgb7qML%2Fimage.png?alt=media&amp;token=bf813f5f-dba1-4b09-8289-c0cc3032e023" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2F0xAatB7QxxFrPgEoUWzH%2Fimage.png?alt=media&amp;token=a9c323cd-2152-4dfe-94d8-650829285671" alt=""><figcaption></figcaption></figure>

6. Reproduce the Issue:
   * On the iPhone, open “Authenticator” and attempt to log in to reproduce the issue.
   * Once the issue is reproduced, stop Fiddler capturing by clicking “Capturing” in the lower-left corner of Fiddler.
   * Save the captured sessions by clicking File and selecting Save.

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2F3UFS4lFTxE0EGhf89LI9%2Fimage.png?alt=media&amp;token=05439dbc-4862-4294-9221-e674bae05fdf" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2627915664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC5L8BFhTKgXFngIiQkEm%2Fuploads%2FsRzf6bqgVvuun3ji2OoJ%2Fimage.png?alt=media&amp;token=03cc68a0-dc5b-40d4-9c21-bdae9bb56335" alt=""><figcaption></figcaption></figure>
