Comments (3)
The cause of this error seems to be, that some Tokens (got mine with the MSAL.PS module) can't be processed properly by the module and result in this error. If I invoke the request myself it works fine.
This is the solution in case you have the same problem:
Invoke-RestMethod -Uri https://graph.microsoft.com/v1.0/invitations -Method POST -UseBasicParsing -Body "{`"invitedUserEmailAddress`":`"$email`",`"inviteRedirectUrl`":`"$redirectUrl`", `"invitedUserDisplayName`":`"$lastname, $firstname`"}" -Headers @{"Authorization"="Bearer $($token.Accesstoken)"}
from azure-activedirectory-powershell.
I also reported this issue here: https://feedback.azure.com/forums/598699-azure-cloud-shell/suggestions/42345556-please-resolve-error-in-new-azureadmsinvitation
If anyone else has also problems with it, feel free to upvote.
from azure-activedirectory-powershell.
+1 hitting this running under an SPN from an ADO pipeline. Thanks for the hint on the token.
Edit:
Looks like this was a bad implementation on my end. I needed to pass both the AaDAccess token and the MSAccessToken to Connect-AzureAD. There are a number of bad implementations that come up in web searches.
from azure-activedirectory-powershell.
Related Issues (20)
- Enterprise App - how do I get cert info, notification email, user attribs, claims? HOT 3
- Unable to add Application Permissions to App Registration HOT 1
- Broken with PowerShell 6.2.3
- Not working with PowerShell 7.0.0-rc.1 HOT 7
- Removing Sign In Options and Thirdparty Login HOT 1
- How to login to custom Azure environment? HOT 1
- Set-AzureADApplicationLogo not working HOT 3
- Specifying type for ReplyURLs in Set-AzureADApplication
- Error: Property requiredResourceAccess.resourceAccess is invalid, when specifying "Type" as "Role" while creating graph permission for AAD App HOT 1
- New-AzureADMSNamedLocationPolicy policies are only viewable in the Preview Portal HOT 1
- Revoke-AzureADUserAllRefreshToken fails
- Does not display the first variable
- How to Restore deleted Service Principals?
- AzureADPreview - 'All' parameter of Get-AzureADUser behaves like a "boolean parameter" rather than a "switch parameter" HOT 1
- property 'samlToken' does not exist on type 'Microsoft.DirectoryServices.OptionalClaims' HOT 3
- When supplying null "source" in an optionalClaim, the manifest results in an empty string and not null
- Get-AzureADMSConditionalAccessPolicy fails when any policy has Linux selected as a device platform. HOT 1
- New-AzureADApplication: Missing Parameter to update Description
- Set-MsolPasswordPolicy : Access Denied. You do not have permissions to call this cmdlet. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-activedirectory-powershell.