Hero Banner

Secure Application Model

Learn and ask questions on how to implement secure application model

Reply
msftfanboy7
Level 2 Contributor

GDAP beta/tenantRelationships endpoint returns 500 internal server error

Hello! Has anyone else had new challenges querying GDAP relationships? This approach has been working for months, but today:

Invoke-RestMethod : The remote server returned an error: (500) Internal Server Error.

 

The PowerShell script implementing Secure App Model uses:

 

 

$graphToken = New-PartnerAccessToken -ApplicationId $ApplicationId -Credential $credential -RefreshToken $refreshToken -Scopes 'https://graph.microsoft.com/.default' -ServicePrincipal -Tenant $partnerTenantID

$GraphHeader = @{ "Authorization" = "Bearer $($graphToken.accesstoken)" } 

$Customers = (Invoke-RestMethod -Uri "https://graph.microsoft.com/beta/tenantRelationships/delegatedAdminRelationships" -Method GET -Headers $GraphHeader).value 

 

 

 

Perhaps unrelated, but strange, earlier this week I started getting blank customer.displayName for each result item (but obviously I'm not getting that far today). Anybody else seen this too or have suggestions?

 

u/odata.etag : <redacted>
id : <redacted>
displayName : <redacted>
duration : P730D
status : active
createdDateTime : 2022-09-01T22:19:52.1938709Z
activatedDateTime : 2022-09-01T22:19:55.4473234Z
lastModifiedDateTime : 2022-09-01T22:19:55.4473234Z
endDateTime : 2024-08-31T22:19:55.4473234Z
customer : @{tenantId=<redacted>; displayName=}
accessDetails : @{unifiedRoles=System.Object[]}

 

 

 Thank you!

1 ACCEPTED SOLUTION
JanoschUlmer
Microsoft

@msftfanboy7 : Getting the same 500 error for all APIs except delegated admin customer - looks like a technical problem that should be reported to support. I can & will ask internally, but not sure I get a response this way. 

Kind regards, Janosch
Receive consultations via Technical Presales and Deployment Services team

View solution in original post

5 REPLIES 5
JanoschUlmer
Microsoft

@msftfanboy7 : Getting the same 500 error for all APIs except delegated admin customer - looks like a technical problem that should be reported to support. I can & will ask internally, but not sure I get a response this way. 

Kind regards, Janosch
Receive consultations via Technical Presales and Deployment Services team
msftfanboy7
Level 2 Contributor

@JanoschUlmer The API connection is working again today, thank you so much for your help! The only outstanding issue that started last week is that the customer.displayName property is returning null values which would normally look like this:

 

"customer": { "tenantId": "4fdbff88-9d6b-42e0-9713-45c922ba8001", "displayName": "Contoso Inc" }



Is submitting a support request through the M365 Admin Center a viable option for API support? I don't currently have access to an Azure support plan.

JanoschUlmer
Microsoft

@msftfanboy7 Yes, I noticed that instead there is DisplayName property (not a child property for "customer") which contains these values now, but I did not find out if this is an intentional change.

For Graph Issues, I would suggest to start here: Microsoft Graph Dev Center | Support - and yes, M365 Admin Center is one option raise a ticket. 

 

Another way to report this, that usually works quite well, if giving feedback on the documentation itself, e.g. reporting for this site that the response example is not accurate: https://learn.microsoft.com/en-us/graph/api/delegatedadminrelationship-get?view=graph-rest-beta&tabs=http#response-1

The documentation owners have a direct escalation path to engineering, so usually is clarified quite quickly if this is an error or recent change in the beta API.

 

Kind regards, Janosch
Receive consultations via Technical Presales and Deployment Services team
msftfanboy7
Level 2 Contributor

Thank you for the direction on the support channels. The displayName property at the top level of the results is the name of the GDAP relationship (and the way it's displayed in Partner Center). But, it's different from the customer.displayName property which is the customer name. So I'll be excited if/when customer.displayName comes back to life to avoid extra steps using the tenantID to return the customer name via an additional query.

 

I'm very grateful for this partner community provision and your invaluable insights!

v-jillarmour
Community Manager

tracking. I know nothing of this, so I hope someone from the community can help here.