Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create Immersive Reader with AAD configuration according to PowerShell script #348

Closed
thomasgauvin opened this issue Feb 25, 2022 · 4 comments

Comments

@thomasgauvin
Copy link

thomasgauvin commented Feb 25, 2022

This resource https://docs.microsoft.com/en-us/azure/applied-ai-services/immersive-reader/how-to-create-immersive-reader documents a PowerShell script that would create the resources and configure them as need be. However, I am encountering troubles trying to execute the script, such as the following:

SecretExpiration '2022-12-31'                        
Exception: 
Line |
  17 |          throw "Error: AADAppIdentifierUri must be a valid URI"
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Error: AADAppIdentifierUri must be a valid URI

image

Is there any advice or fix for this?

@rwallerms
Copy link
Contributor

Hi @thomasgauvin, what value are you passing in for the AADAppIdentifierUri parameter?

The value needs to be a Absolute URI with the https scheme prefix, like below:
https://immersivereaderaad-mycompany

The script is calling Uri.TryCreate() for with UriKind.Absolute, as described here:
https://docs.microsoft.com/en-us/dotnet/api/system.uri.trycreate?view=net-6.0

@thomasgauvin
Copy link
Author

thomasgauvin commented Mar 1, 2022

Hi @rwallerms, this is indeed the value that I was passing. I have an ongoing support request and will document the conclusion from that. Thank you for your response.

@rwallerms
Copy link
Contributor

@thomasgauvin, found this related issue. It suggests there was an AAD breaking change recently and perhaps upgrading PowerShell Az.Resources module will help.

Azure/azure-powershell#16097.

Here was the notice of the AAD breaking change, which was posted in the thread above

https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-breaking-changes#appid-uri-in-single-tenant-applications-will-require-use-of-default-scheme-or-verified-domains

@rwallerms
Copy link
Contributor

Determined the fix with @thomasgauvin, which was to use the api:// scheme prefix, instead of https://, on the AAD URI. Thanks again for your help Thomas!

How To Doc has been updated with this info.

https://docs.microsoft.com/azure/applied-ai-services/immersive-reader/how-to-create-immersive-reader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants