question

NickWiechers-6344 avatar image
0 Votes"
NickWiechers-6344 asked TravisMiller-6432 edited

Azure AD Enterprise App SCIM Provisioning Oauth Bearer Token not in header

Hi

I am starting to develop a SCIM endpoint to work with an Enterprise app in Azure AD. On the provisioning page on the Admin Credentials section, I enter the URL and the secret token and then click the Test Connection button. The documentation suggests that the secret token should be sent as a header called authorization. However, on examining the Headers at the end point, I see only the following headers

Content-Length=0
Host=myhost.xxx.xxx
ADSCIMVersion=6.0

I expect I am missing something really obvious. Can you explain how the token is sent and how I should attempt to read it?

Regards

azure-ad-user-provisioning
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NickWiechers-6344 avatar image
0 Votes"
NickWiechers-6344 answered SaurabhSharma-msft commented

Seems to be related to my endpoint doing a 301 redirect. The auth header isn't persisted.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@NickWiechers-6344 How did you get the secret token which you are trying to pass through Enterprise application blade ?

0 Votes 0 ·

@NickWiechers-6344 Can you please help providing the asked info.

0 Votes 0 ·
TravisMiller-6432 avatar image
0 Votes"
TravisMiller-6432 answered TravisMiller-6432 edited

Just in the progress of figuring this out with Django Rest framework. A redirect occurs when there is no trailing slash, which is what microsoft trys. Redirects can kill POST data.

Here's the setting I found to fix:
"By default the URLs created by SimpleRouter are appended with a trailing slash. This behavior can be modified by setting the trailing_slash argument to False when instantiating the router. For example:

router = SimpleRouter(trailing_slash=False)"

Also see this from a stack overflow:
"The effect you are seeing is because your URL is mapped with an ending / and the link you are requesting is without the ending /. Django by default will try a URL with ending /, if it cannot find a match with the requested URL.

This is controlled by the APPEND_SLASH setting, which is set to True by default:

When set to True, if the request URL does not match any of the patterns in the URLconf and it doesn’t end in a slash, an HTTP redirect is issued to the same URL with a slash appended. Note that the redirect may cause any data submitted in a POST request to be lost.

To fix this problem, change your command to:

http http://127.0.0.1:8006/snippets/"

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.