Authentication and authorization basics for .us government

Balaita, George (George) **CTR** 0 Reputation points
2024-06-25T12:01:53.22+00:00

Hi,

I need to sign in and send email using GRAPH API for US Government.
I followed every step from here:
https://learn.microsoft.com/en-us/graph/auth/auth-concepts
https://learn.microsoft.com/en-us/graph/auth-register-app-v2
https://learn.microsoft.com/en-us/graph/deployments

But I get the Null Exception issue:
System.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.Graph.HttpProvider.<SendAsync>d__18.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at Microsoft.Graph.BaseRequest.<SendRequestAsync>d__35.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

For global authentication, with ".com" everything works as expected.
Can you please advice me how should I debug it? Is there a way to check these configuration?

Thanks,
George

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,404 questions
0 comments No comments
{count} votes