Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Role assigment required?

Open gaborenok opened this issue 1 year ago • 3 comments

Hello everyone,

Does anyone have any suggestions for this?

My app registration is going to be a multi-tenant application, so I can run exports for multiple tenants with the same app registration.

Is there a way to add just API permissions and not roles to the app registration? It was working for me in the past (around 10 months ago) with just API permissions but now I am getting this error:

"The role assigned to application {MyClientID} isn't supported in this scenario. Please check online documentation for assigning correct Directory Roles to Azure AD Application for EXO App-Only Authentication."

Thank you in advance!

gaborenok avatar Jul 02 '25 12:07 gaborenok

It will depend on what tasks you are performing if Entra ID roles need to be assigined. There are some Graph calls not possible without Entra ID role. Also I would recommend to separate credentials for each environment. This reduces the risk when credentials are compromised, but also when performing tests accidentally to the wrong environment.

MarzelLaning42 avatar Jul 18 '25 14:07 MarzelLaning42

@gaborenok Any news on this? Depending on the workload you definitely need Entra roles (e.g. for Exchange Online).

FabienTschanz avatar Jul 25 '25 12:07 FabienTschanz

Thank you, everyone, for the answers and the follow-up. I will keep using the Entra roles for this!

gaborenok avatar Jul 25 '25 12:07 gaborenok